<!DOCTYPE html>
<html>
<head>
    <title>工装档案资料</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.toolsMapNo" @on-enter="query" placeholder="工装图号"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">

                <!--#if($shiro.hasPermission("toolsfile:deptCheck"))
                <i-button type="primary" @click="deptCheck"><i class="fa fa-gavel"></i>&nbsp;审核</i-button>
                #end
                #if($shiro.hasPermission("toolsfile:leaderCheck"))
                <i-button type="primary" @click="leaderCheck"><i class="fa fa-gavel"></i>&nbsp;审核</i-button>
                #end-->
                <i-button type="info" @click="goToolsEqu"><i class="fa fa-bars"></i>&nbsp;附件</i-button>
                <i-button type="success" @click="addKnowBase"><i class="fa fa-plus"></i>&nbsp;纳入知识库</i-button>
                #if($shiro.hasPermission("toolsfile:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("toolsfile:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("toolsfile:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>

    <div id="reviewLayer" style="display: none;">
    <form class="form-horizontal" style="width: 350px;">
        <div class="form-group">
            <div class="form-group">
                <div class="col-sm-2 control-label">审核状态</div>
                <div class="col-sm-8" style="margin-top: 6px">
                    <Radio-group v-model="toolsFile.checkResult">
                        <Radio :label="1" ><span>通过</span></Radio>
                        <Radio :label="2" ><span>不通过</span></Radio>
                    </Radio-group>
                </div>
            </div>
        </div>
    </form>
</div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="toolsFile" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="工装图号" prop="toolsMapNo">
                        <i-input v-model="toolsFile.toolsMapNo" placeholder="工装图号"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="版本号" prop="toolsEdNo">
                        <i-input v-model="toolsFile.toolsEdNo" placeholder="版本号"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="编号" prop="toolsNo">
                        <i-input v-model="toolsFile.toolsNo" placeholder="编号"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="档案类型" prop="type">
                        <i-select v-model="toolsFile.type" placeholder="档案类型">
                            <i-option v-for="item in fileTypeArray" :value="item.value" :key="item.value">{{item.name}}</i-option>
                        </i-select>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="知识类型" prop="konwTypeName">
                        <i-input v-model="toolsFile.konwTypeName" placeholder="知识类型"
                                 icon="md-arrow-dropdown-circle" @on-click="getSpare"></i-input>
                    </Form-item>
                </i-col>
                </Row>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">
                返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/tools/toolsfile.js?_${date.systemTime}"></script>
</body>
</html>
